﻿using System.Net.DnsToolkit.Packet;
using System.Net.DnsToolkit.Util;
using System.Net.DnsToolkit.Serializer.Stream.Compression;
using System.Net.DnsToolkit.Serializer.Stream.Extension;

namespace System.Net.DnsToolkit.Serializer.Stream.Writer {
    public class QuestionWriter : IQuestionWriter<System.IO.Stream> {

        public void Write(System.IO.Stream destination, IQuestion question, ICompressionContext compression) {

            destination.WriteDomainName(question.QName, (CompressionContext)compression);
            destination.Write16((ushort)question.QType);
            destination.Write16((ushort)question.QClass);
        }

    }
}
